package com.example.demo;

import java.util.List;

import org.noear.nami.annotation.NamiClient;
import org.noear.nami.annotation.NamiMapping;
import org.noear.nami.annotation.NamiParam;
import org.noear.nami.common.ContentTypes;
import org.noear.solon.annotation.*;
import org.noear.solon.core.handle.UploadedFile;

@NamiClient(url = "http://localhost:8080/rpc")
public interface HelloService {
  @NamiMapping("POST hello")
  String hello(String name);

  @NamiMapping("POST test01")
  String test01(@NamiParam("ids") List<String> ids);

  @NamiMapping(value = "POST test02", headers = ContentTypes.FORM_DATA)
  String test02(@NamiParam("file") UploadedFile file);

  @NamiMapping(value = "POST test03")
  String test03();


  @Mapping(value = "test04/{namex}")
  @Get
  String test04(@Path("namex") String name);

  @Mapping(value = "test05")
  @Post
  String test05(@Body HelloDto dto);
}
